#include "errno.h"

int errno;

char* errnostr[ERRNO_MAX];

char* strerror(int n){
	return errnostr[n];
}


void init_errno(){
	errnostr[ERR_PERM]="Permission denied.";
	errnostr[ERR_UNEX]="Not such file.";
	errnostr[ERR_NLEN]="Invalid name length.";
	errnostr[ERR_FILEX]="File exists.";
	errnostr[ERR_NOTDIR]="File isnt a directory.";
	errnostr[WRONG_FD]="Wrong file descriptor.";
	errnostr[WRONG_TYPE]="Wrong file type.";
	errnostr[UNKNOW]="Unknown error.";
}
